#ifndef WIDGET_H
#define WIDGET_H

#include <QWidget>
#include <qmainwindow.h>
#include <QLabel>
#include <QPushButton>
#include <QLineEdit>
#include <QDial>
#include <QGridLayout>
#include <QDebug>
#include <QIcon>
#include <QPalette>
#include <QFont>
#include <QTcpSocket>
#include <QMessageBox>
#include <QHostAddress>
#include <QPixmap>
#include <QTimer>
#include <QTime>

QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow(QWidget *parent = nullptr);
    ~MainWindow();


private slots:

    void on_server_link_clicked();

    void my_connect();

    void pic_read();

    void on_restart_clicked();

    void on_camera_link_clicked();

    void on_serial_link_clicked(bool checked);

    void on_camera_link_2_clicked();

    void on_horizontalSlider_valueChanged(int value);

    void on_horizontalSlider_2_valueChanged(int value);

    void on_horizontalSlider_3_valueChanged(int value);

    void on_horizontalSlider_4_valueChanged(int value);

    void on_horizontalSlider_5_valueChanged(int value);

    void on_horizontalSlider_6_valueChanged(int value);

private:
    Ui::MainWindow *ui;
    QTcpSocket *socket;

    int ret;
    int flag = 1;
    unsigned int piclen;
    char pic_buf[1024*1024] = {0};
    QByteArray ptr;

};
#endif // MAINWINDOW_H
